f = open("teste.txt", "w")
s= "treta"

for k in range(10): f.write; f.write("\n")
f.close()
f = open("teste.txt", "r")
f.seek(4)
print f.tell()
x = f.read(10)
print x
c = 0
for line in f:
    print "{0}:". format(c), line
    c += 1

f.close()
with open("teste.txt") as f:
    x = f.readline()
    if x == 'treta\n':
        print "voila"
